package test;

/**
 * @author: suruomo
 * @date: 2021/1/8 10:56
 * @description:
 */
public class Solution {
    public void rotate(int[] nums, int k) {
        int n=nums.length;
        int[] temp=new int[n];
        for (int i = 0; i < n; i++) {
            temp[(i+k)%n]=nums[i];
        }
        for (int i = 0; i < n; i++) {
            nums[i]= temp[i];
        }
    }
}
